package com.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project.bean.UserBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface IUserMapper extends BaseMapper<UserBean> {
    boolean addRoles(@Param("userId") Integer userId,
                     @Param("roles") Integer[] roleId);

    IPage<UserBean> findByItem(Page pg, @Param("userName") String userName);

    void updateRoles(@Param("userId") Integer userId,
                     @Param("roleId") Integer[] roleId);
}
